import { defineFakeRoute } from 'vite-plugin-fake-server/client'

// 模拟刷新token接口
export default defineFakeRoute([
  {
    url: '/api/users/me',
    method: 'get',
    response: () => {
      return {
        code: 10000,
        message: 'success',
        data: {
          username: 'admin',
          nickname: '大哥大',
          avatar: 'https://avatars.githubusercontent.com/u/44761321',
          // roles: ['admin']
          auth: 99
        }
      }
    }
  },
  {
    url: '/api/users',
    method: 'post',
    response: () => {
      return {
        code: 10000,
        message: 'success',
        data: null
      }
    }
  }
])
